<template>
  <view>
    <up-navbar
      :title="title"
      @leftClick="leftClick"
      @rightClick="rightClick"
      :autoBack="true"
      :placeholder="true"
      :leftIconSize="leftIconSize"
    >
    </up-navbar>
  </view>
</template>

<script setup>
import { ref, onMounted } from "vue";

// 定义组件属性
const props = defineProps({
  title: {
    type: String,
    default: "标题",
  },
  leftIconSize: {
    type: Number,
    default: 20,
  },
});
// 返回方法
function leftClick() {
  var pages = getCurrentPages();
  console.log(pages);
  // if (pages && pages.length > 1) {
  //   uni.navigateBack();
  // } else {
  //   uni.reLaunch({
  //     url: "/pages/tabbar/index/index",
  //   });
  // }
}
function rightClick() {
  console.log("rightClick");
}
</script>

<style lang="scss" scoped></style>
